\(\int \frac {1}{\sqrt {b x+c x^2}} \, dx\) [46]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 28 \[ \int \frac {1}{\sqrt {b x+c x^2}} \, dx=\frac {2 \text {arctanh}\left (\frac {\sqrt {c} x}{\sqrt {b x+c x^2}}\right )}{\sqrt {c}} \]

[Out]

2*arctanh(x*c^(1/2)/(c*x^2+b*x)^(1/2))/c^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {634, 212} \[ \int \frac {1}{\sqrt {b x+c x^2}} \, dx=\frac {2 \text {arctanh}\left (\frac {\sqrt {c} x}{\sqrt {b x+c x^2}}\right )}{\sqrt {c}} \]

[In]

Int[1/Sqrt[b*x + c*x^2],x]

[Out]

(2*ArcTanh[(Sqrt[c]*x)/Sqrt[b*x + c*x^2]])/Sqrt[c]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 634

Int[1/Sqrt[(b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[1/(1 - c*x^2), x], x, x/Sqrt[b*x + c*x^2
]], x] /; FreeQ[{b, c}, x]

Rubi steps \begin{align*} \text {integral}& = 2 \text {Subst}\left (\int \frac {1}{1-c x^2} \, dx,x,\frac {x}{\sqrt {b x+c x^2}}\right ) \\ & = \frac {2 \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {b x+c x^2}}\right )}{\sqrt {c}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.96 \[ \int \frac {1}{\sqrt {b x+c x^2}} \, dx=-\frac {2 \sqrt {x} \sqrt {b+c x} \log \left (-\sqrt {c} \sqrt {x}+\sqrt {b+c x}\right )}{\sqrt {c} \sqrt {x (b+c x)}} \]

[In]

Integrate[1/Sqrt[b*x + c*x^2],x]

[Out]

(-2*Sqrt[x]*Sqrt[b + c*x]*Log[-(Sqrt[c]*Sqrt[x]) + Sqrt[b + c*x]])/(Sqrt[c]*Sqrt[x*(b + c*x)])

Maple [A] (verified)

Time = 1.97 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.82

method result size
pseudoelliptic \(\frac {2 \,\operatorname {arctanh}\left (\frac {\sqrt {x \left (c x +b \right )}}{x \sqrt {c}}\right )}{\sqrt {c}}\) \(23\)
default \(\frac {\ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x}\right )}{\sqrt {c}}\) \(29\)

[In]

int(1/(c*x^2+b*x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

2/c^(1/2)*arctanh((x*(c*x+b))^(1/2)/x/c^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 62, normalized size of antiderivative = 2.21 \[ \int \frac {1}{\sqrt {b x+c x^2}} \, dx=\left [\frac {\log \left (2 \, c x + b + 2 \, \sqrt {c x^{2} + b x} \sqrt {c}\right )}{\sqrt {c}}, -\frac {2 \, \sqrt {-c} \arctan \left (\frac {\sqrt {c x^{2} + b x} \sqrt {-c}}{c x}\right )}{c}\right ] \]

[In]

integrate(1/(c*x^2+b*x)^(1/2),x, algorithm="fricas")

[Out]

[log(2*c*x + b + 2*sqrt(c*x^2 + b*x)*sqrt(c))/sqrt(c), -2*sqrt(-c)*arctan(sqrt(c*x^2 + b*x)*sqrt(-c)/(c*x))/c]

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 75 vs. \(2 (26) = 52\).

Time = 0.31 (sec) , antiderivative size = 75, normalized size of antiderivative = 2.68 \[ \int \frac {1}{\sqrt {b x+c x^2}} \, dx=\begin {cases} \frac {\log {\left (b + 2 \sqrt {c} \sqrt {b x + c x^{2}} + 2 c x \right )}}{\sqrt {c}} & \text {for}\: c \neq 0 \wedge \frac {b^{2}}{c} \neq 0 \\\frac {\left (\frac {b}{2 c} + x\right ) \log {\left (\frac {b}{2 c} + x \right )}}{\sqrt {c \left (\frac {b}{2 c} + x\right )^{2}}} & \text {for}\: c \neq 0 \\\frac {2 \sqrt {b x}}{b} & \text {for}\: b \neq 0 \\\tilde {\infty } x & \text {otherwise} \end {cases} \]

[In]

integrate(1/(c*x**2+b*x)**(1/2),x)

[Out]

Piecewise((log(b + 2*sqrt(c)*sqrt(b*x + c*x**2) + 2*c*x)/sqrt(c), Ne(c, 0) & Ne(b**2/c, 0)), ((b/(2*c) + x)*lo
g(b/(2*c) + x)/sqrt(c*(b/(2*c) + x)**2), Ne(c, 0)), (2*sqrt(b*x)/b, Ne(b, 0)), (zoo*x, True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.96 \[ \int \frac {1}{\sqrt {b x+c x^2}} \, dx=\frac {\log \left (2 \, c x + b + 2 \, \sqrt {c x^{2} + b x} \sqrt {c}\right )}{\sqrt {c}} \]

[In]

integrate(1/(c*x^2+b*x)^(1/2),x, algorithm="maxima")

[Out]

log(2*c*x + b + 2*sqrt(c*x^2 + b*x)*sqrt(c))/sqrt(c)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 59 vs. \(2 (22) = 44\).

Time = 0.28 (sec) , antiderivative size = 59, normalized size of antiderivative = 2.11 \[ \int \frac {1}{\sqrt {b x+c x^2}} \, dx=\frac {1}{4} \, \sqrt {c x^{2} + b x} {\left (2 \, x + \frac {b}{c}\right )} + \frac {b^{2} \log \left ({\left | 2 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + b x}\right )} \sqrt {c} + b \right |}\right )}{8 \, c^{\frac {3}{2}}} \]

[In]

integrate(1/(c*x^2+b*x)^(1/2),x, algorithm="giac")

[Out]

1/4*sqrt(c*x^2 + b*x)*(2*x + b/c) + 1/8*b^2*log(abs(2*(sqrt(c)*x - sqrt(c*x^2 + b*x))*sqrt(c) + b))/c^(3/2)

Mupad [B] (verification not implemented)

Time = 9.05 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\sqrt {b x+c x^2}} \, dx=\frac {\ln \left (\frac {\frac {b}{2}+c\,x}{\sqrt {c}}+\sqrt {c\,x^2+b\,x}\right )}{\sqrt {c}} \]

[In]

int(1/(b*x + c*x^2)^(1/2),x)

[Out]

log((b/2 + c*x)/c^(1/2) + (b*x + c*x^2)^(1/2))/c^(1/2)